<template>
  <div class="apply-card" @click="onClick">
    <div class="t">
      <div>
        <img class="name-icon" src="/@/assets/images/authorizer.png" alt="" />
        承租人姓名
      </div>
      <span>{{ info.custName }}</span>
    </div>
    <div class="content">
      <div class="item">
        <div class="label">
          <img class="item-icon" src="/@/assets/images/shenqinghao.png" alt="" />
          证件号:
        </div>
        <div class="val">{{info.certNo}}</div>
      </div>
      <div class="item">
        <div class="label">
          <img class="item-icon" src="/@/assets/images/documents.png" alt="" />
          设备总额:
        </div>
        <div class="val">{{info.totalPurchasePrice}}</div>
      </div>
      <div class="item">
        <div class="label">
          <img class="item-icon" src="/@/assets/images/empower.png" alt="" />
          主办人:
        </div>
        <div class="val">{{info.sponsorName}}</div>
      </div>
      <div class="tags">
        <span>融资客户</span>
        <span>融资客户</span>
        <span>融资客户</span>
        <span>融资客户</span>
      </div>
    </div>
    <div class="f">
      <span class="time">{{info.finishTime}}</span>
    </div>
    <span class="btn" v-if="props.type == 'wait'">
      驳回修改
      <img src="/@/assets/images/play.png" alt="" />
    </span>
    <span class="btn" style="background-color: transparent" v-else>
      <img src="/@/assets/images/views.png" alt="" />
    </span>
  </div>
</template>

<script setup>
  import { ref, watch, onMounted } from 'vue';
  const emit = defineEmits(['itemClick']);
  const props = defineProps({
    type: {
      type: String,
      default: 'wait',
    },
    info: {
      type: Object,
      default: () => {},
    },
  });
  const onClick = () => {
    console.log(123);

    emit('itemClick');
  };
</script>
<style scoped lang="less">
  .apply-card {
    width: calc(25% - 30rem);
    padding: 24rem 20rem 24rem;
    background-color: #fff;
    box-shadow: 0rem 0rem 15rem 0rem rgba(0, 0, 0, 0.1);
    border-radius: 12rem;
    position: relative;
    .t {
      font-family: Microsoft YaHei;
      font-weight: 400;
      font-size: 18rem;
      color: #fd901d;
      display: flex;
      align-items: center;
      justify-content: space-between;
      border-bottom: 1rem solid #e5e5e5;
      padding-bottom: 15rem;
      .name-icon {
        width: 17rem;
        height: 16rem;
        margin-right: 5rem;
      }
      span {
        font-family: Microsoft YaHei;
        font-weight: 400;
        font-size: 18rem;
        color: #000000;
      }
    }
    .f {
      display: flex;
      margin-top: 15rem;

      .time {
        font-family: Microsoft YaHei;
        font-weight: 400;
        font-size: 16rem;
        color: #a5a5a5;
      }
    }
    .btn {
      width: 137rem;
      height: 42rem;
      background: #0062ea;
      font-family: Microsoft YaHei;
      font-weight: 400;
      font-size: 16rem;
      color: #ffffff;
      display: flex;
      align-items: center;
      justify-content: center;
      position: absolute;
      right: 0;
      bottom: 12rem;
      cursor: pointer;

      img {
        width: 23rem;
        height: 23rem;
        margin-left: 17rem;
      }
    }
    .play-img {
      width: 23rem;
      height: 23rem;
    }
    .content {
      .item {
        padding: 20rem 0 0;
        display: flex;
        align-items: center;

        .label {
          width: 109rem;
          font-family: Microsoft YaHei;
          font-weight: 400;
          font-size: 16rem;
          color: #a5a5a5;
          display: flex;
          align-items: center;
          text-align: justify;
          .item-icon {
            width: 17rem;
            height: 14rem;
            margin-right: 16rem;
          }
        }
        .val {
          font-family: Microsoft YaHei;
          font-weight: 400;
          font-size: 16rem;
          color: #3b3b3b;
        }
      }
      .tags {
        padding: 20rem 0 0;
        span {
          display: inline-block;
          padding: 7rem 12rem;
          font-family: Microsoft YaHei;
          font-weight: 400;
          font-size: 12rem;
          color: #2d9465;
          margin: 6rem 6rem 6rem 0;
          background-color: #ddf7e8;
        }
      }
    }
  }
</style>
